package org.x4444.entity;

import java.io.Serializable;

public class OrderDetailPK2 implements Serializable {

	private static final long serialVersionUID = -4604002634821612616L;

	Integer orderId;

	Integer productId;

	public OrderDetailPK2(Integer orderId, Integer productId) {
		super();
		this.orderId = orderId;
		this.productId = productId;
	}

	public OrderDetailPK2() {
		orderId = new Integer(0);
		productId = new Integer(0);
	}

	@Override
	public int hashCode() {
		return 7 + 31 * orderId + 31 * productId;
	}

	@Override
	public boolean equals(Object obj) {
		if (!(obj instanceof OrderDetailPK2)) {
			return false;
		}

		OrderDetailPK2 o2 = (OrderDetailPK2) obj;
		if (orderId != null && productId != null) {
			return orderId.equals(o2.orderId) && productId.equals(o2.productId);
		}
		return false;
	}

	public Integer getOrderId() {
		return orderId;
	}

	public void setOrderId(Integer orderId) {
		this.orderId = orderId;
	}

	public Integer getProductId() {
		return productId;
	}

	public void setProductId(Integer productId) {
		this.productId = productId;
	}

}
